package com.hm.pan.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.hm.pan.mapper.AdminMapper;
import com.hm.pan.model.Admin;
import com.hm.pan.service.AdminService;

@Service
public class AdminServiceImpl implements AdminService {
	
	@Resource
	private AdminMapper adminMapper;

	@Override
	public boolean update(Admin admin) {
		return adminMapper.update(admin);
	}

	@Override
	public String findByPW(String oldadminPassword) {
		Object message =  adminMapper.findByPW(oldadminPassword);
		if(message==null) {
			return "您输入的原密码错误";
		}
		return null;
	}
	
	@Override
	public Object login(String adminName) {
		// TODO Auto-generated method stub
		return adminMapper.login(adminName);
	}
	
	


}
